import tornado.web
from views import Index,Admin
import config


#路由 

class Application(tornado.web.Application):
    def __init__(self):
        handlers = [
            (r"/", Index.Get_code),
            (r"/user/register", Index.Register),
            (r"/user/login", Index.Login),
            (r"/user/get_code", Index.Get_code),
            (r"/user/get_email", Index.Get_email),

            (r"/user", Admin.User_list),
            (r"/user_add", Admin.User_add),
            (r"/user_del/", Admin.User_del),
            (r"/user_dels", Admin.User_dels),
            (r"/update/", Admin.Update),
            (r"/welcome", Admin.Welcome),

        ]
        super(Application,self).__init__(handlers,**config.setting)